//
//  Utils.h
//  Medical_Wisdom
//
//  Created by Mac on 14-1-26.
//  Copyright (c) 2014年 NanJingXianLang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/***************************************************************************
 *
 * 工具类
 *
 ***************************************************************************/

@class AppDelegate;
//@class UserInfo;

@interface Utils : NSObject

/*
 AppDelegate
 */
/**
*MD5 加密
*
*
*/
+(NSString *)getMd5_32Bit:(NSString *)dataBase;
/**
 *自动字段解析
 *不是循环列表
 *
 */
+(NSMutableArray *)getDictionaries:(NSDictionary *)allKeys;

+(AppDelegate *)applicationDelegate;

+(UIImageView *)imageViewWithFrame:(CGRect)frame withImage:(UIImage *)image;

+(UILabel *)labelWithFrame:(CGRect)frame withTitle:(NSString *)title titleFontSize:(UIFont *)font textColor:(UIColor *)color backgroundColor:(UIColor *)bgColor alignment:(NSTextAlignment)textAlignment;


#pragma mark - alertView提示框
+(UIAlertView *)alertTitle:(NSString *)title message:(NSString *)msg delegate:(id)aDeleagte cancelBtn:(NSString *)cancelName otherBtnName:(NSString *)otherbuttonName;
#pragma mark - btnCreate
+(UIButton *)createBtnWithType:(UIButtonType)btnType frame:(CGRect)btnFrame backgroundColor:(UIColor*)bgColor;

#pragma mark isValidateEmail 邮箱验证
+(BOOL)isValidateEmail:(NSString *)email;
#pragma mark isValidateUserName 用户名
+(BOOL)isUserName:(NSString *)userName;
#pragma mark isValidatePassWrod 密码
+(BOOL)isPassword:(NSString *)password;
#pragma mark isValidateUrl 路径
+(BOOL)isUrl:(NSString *)urls;
#pragma mark isValidateTelephone 电话号码
+(BOOL)isTelephone:(NSString *)mobile;
#pragma mark isValidateChinese 电话号码
+(BOOL)isChinese:(NSString *)china;
#pragma mark isValidateChinese QQ号码
+(BOOL)isQQ:(NSString *)password;
#pragma mark isValidateChinese 身份证号码
+(BOOL)isUID:(NSString *)password;
#pragma mark isValidateChinese 昵称
+ (BOOL) validateNickname:(NSString *)nickname;
#pragma mark isValidateChinese 车牌
+ (BOOL) validateCarNo:(NSString *)carNo;
#pragma mark isValidateChinese 车型
+ (BOOL) validateCarType:(NSString *)CarType;
#pragma mark isValidateChinese 数字
+(BOOL)isNumber:(NSString *)password;
#pragma  mark toBinarySystemWithDecimalSystem 十进制转二进制
+(NSString *)toBinarySystemWithDecimalSystem:(NSString *)decimal;
#pragma  mark toBinarySystemWithDecimalSystem 二进制转是十进制
+ (NSString *)toDecimalSystemWithBinarySystem:(NSString *)binary;
#pragma  mark cookieValue 设置cookie值
+ (NSString *)cookieValueWithKey:(NSString *)key;
#pragma  mark deleteCookie 删除cookie值
+ (void)deleteCookieWithKey:(NSString *)key;
#pragma  mark ipAddress 解析域名
+ (NSString *)ipAddressFromDomain:(NSString *)strDomain;
#pragma  mark 判断是否为整形：判断是否为浮点形：
+ (BOOL)isPureIntOrFloat:(NSString*)string;
#pragma  mark 清理缓存文件
+(void)removeCache;
//+(float)fileSizeAtPath:(NSString *)path;
 #pragma  mark 遍历文件夹获得文件夹大小
+(float)filePath;
#pragma  mark SDWebImage  删除特定url图片的缓存
+ (void)clearCacheWithUrl:(NSString *)url;
#pragma  mark 自定义提示框
+(void)tipsPromptBox:(NSString *)NameText viewC:(UIView *)views hightNum:(int)number;
#pragma mark--身份证
+(BOOL)isID:(NSString *)idNum;
@end
